home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8327 < prev    next >
Encoding:
Text File  |  1996-08-05  |  796 b   |  34 lines

  1. Path: netnews.ntu.edu.tw!news
  2. From: antony@public.bta.net.cn (Antony Yandong Chen)
  3. Newsgroups: comp.lang.c
  4. Subject: How can I pick out charactors from argv[ ] ?
  5. Date: Sun, 3 Mar 1996 14:02:34 +800
  6. Organization: Jardine Office System (JOS)
  7. Message-ID: <4hbcsh$3do@netnews.ntu.edu.tw>
  8. NNTP-Posting-Host: @202.96.26.143
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-NewsReader: QNews v0.9b4 Beta 15 Apr 1994 Evaluation copy.
  13.  
  14. Hi
  15.  
  16. I got this from a C turtorial book:
  17.  
  18. main (argc,argv)
  19. int argc;
  20. char *argv[];
  21.  
  22. {
  23.         printf("argc = %d\n",argc);
  24.         printf("argv1 = %s\n",argv[1]);
  25.  
  26. }
  27.  
  28. I could execute it OK, but I couldn't be able to pick out single 
  29. charactors from string argv[], anybody can tell me how to make it?
  30.  
  31. Thanx in advance
  32. Antony
  33.  
  34.